/*
 Navicat Premium Data Transfer

 Source Server         : one
 Source Server Type    : MySQL
 Source Server Version : 50730
 Source Host           : localhost:3306
 Source Schema         : mybbs

 Target Server Type    : MySQL
 Target Server Version : 50730
 File Encoding         : 65001

 Date: 09/05/2021 22:35:55
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for comment
-- ----------------------------
DROP TABLE IF EXISTS `comment`;
CREATE TABLE `comment` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `content` text,
  `rid` int(11) NOT NULL,
  `uid` int(11) NOT NULL,
  `comment_time` varchar(30) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of comment
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for image
-- ----------------------------
DROP TABLE IF EXISTS `image`;
CREATE TABLE `image` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `image_url` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of image
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for info
-- ----------------------------
DROP TABLE IF EXISTS `info`;
CREATE TABLE `info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `request_url` varchar(300) DEFAULT NULL,
  `context_path` varchar(30) DEFAULT NULL,
  `remote_addr` varchar(30) DEFAULT NULL,
  `access_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of info
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for message
-- ----------------------------
DROP TABLE IF EXISTS `message`;
CREATE TABLE `message` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uid` int(11) NOT NULL,
  `other_id` int(11) NOT NULL,
  `other_username` varchar(20) NOT NULL,
  `post_id` int(11) NOT NULL,
  `operation` varchar(20) NOT NULL,
  `displayed_content` varchar(100) NOT NULL,
  `msg_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of message
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for post
-- ----------------------------
DROP TABLE IF EXISTS `post`;
CREATE TABLE `post` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(30) NOT NULL COMMENT '发帖的主题',
  `content` text COMMENT '发帖内容',
  `publish_time` varchar(30) NOT NULL COMMENT '发布时间',
  `reply_time` varchar(30) NOT NULL COMMENT '最后回复时间',
  `reply_count` int(11) DEFAULT '0' COMMENT '回复次数',
  `like_count` int(11) DEFAULT '0' COMMENT '赞次数',
  `scan_count` int(11) DEFAULT '0' COMMENT '浏览次数',
  `uid` int(11) NOT NULL COMMENT '用户id，通过它来关联用户',
  `tid` int(11) NOT NULL COMMENT '主题id,通过它来找到主题记录',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of post
-- ----------------------------
BEGIN;
INSERT INTO `post` VALUES (1, 'test1', 'test content1', '2016-10-24 07:10:11', '2016-10-24 07:10:11', 0, 0, 25, 8, 10);
INSERT INTO `post` VALUES (2, 'test2', 'test content2', '2016-10-24 07:10:13', '2016-10-24 07:10:13', 0, 0, 4, 4, 12);
INSERT INTO `post` VALUES (3, 'test3', 'test content3', '2016-10-24 07:10:14', '2016-10-24 07:10:14', 20, 10, 5, 3, 4);
INSERT INTO `post` VALUES (4, 'test4', 'test content4', '2016-10-24 07:10:15', '2016-10-24 07:10:15', 0, 0, 2, 4, 7);
INSERT INTO `post` VALUES (5, 'test5', 'test content5', '2016-10-24 07:10:16', '2016-10-24 07:10:16', 0, 0, 3, 1, 10);
INSERT INTO `post` VALUES (6, 'test6', 'test content6', '2016-10-24 07:10:17', '2016-10-24 07:10:17', 0, 0, 2, 9, 6);
INSERT INTO `post` VALUES (7, 'test7', 'test content7', '2016-10-24 07:10:18', '2016-10-24 07:10:18', 0, 0, 4, 1, 6);
INSERT INTO `post` VALUES (8, 'test8', 'test content8', '2016-10-24 07:10:19', '2016-10-24 07:10:19', 0, 0, 4, 9, 9);
INSERT INTO `post` VALUES (9, 'test9', 'test content9', '2016-10-24 07:10:20', '2016-10-24 07:10:20', 0, 0, 2, 3, 10);
INSERT INTO `post` VALUES (10, 'test10', 'test content10', '2016-10-24 07:10:21', '2016-10-24 07:10:21', 0, 0, 6, 1, 8);
INSERT INTO `post` VALUES (11, 'test11', 'test content11', '2016-10-24 07:10:22', '2016-10-24 07:10:22', 0, 0, 2, 8, 7);
INSERT INTO `post` VALUES (12, '南师大饭堂丢失钥匙一串，失物招领中...', 'test content12', '2016-10-24 07:10:23', '2016-10-24 07:10:23', 0, 0, 2, 9, 8);
INSERT INTO `post` VALUES (13, '广西经贸校草评选活动有黑幕吗？', 'test content13', '2016-10-24 07:10:24', '2016-10-24 07:10:24', 0, 0, 2, 4, 4);
INSERT INTO `post` VALUES (14, '产业学院2019级男女比例是否均衡？', 'test content14', '2016-10-24 07:10:25', '2016-10-24 07:10:25', 0, 0, 2, 8, 5);
INSERT INTO `post` VALUES (15, '广西经贸产业学院新生颜值如何？', 'test content15', '2016-10-24 07:10:26', '2016-10-24 07:10:26', 0, 0, 2, 4, 3);
INSERT INTO `post` VALUES (16, '南宁师范大学青春争霸赛冠军花落谁家？', 'test content16', '2016-10-24 07:10:28', '2016-10-24 07:10:28', 0, 0, 2, 4, 12);
INSERT INTO `post` VALUES (17, '广西经贸校草评选活动有黑幕吗？', 'test content17', '2016-10-24 07:10:29', '2016-10-24 07:10:29', 0, 0, 2, 3, 8);
INSERT INTO `post` VALUES (18, '南师大饭堂丢失钥匙一串，失物招领中...', 'test content18', '2016-10-24 07:10:30', '2016-10-24 07:10:30', 0, 0, 2, 7, 11);
INSERT INTO `post` VALUES (19, '广西经贸产业学院校长是谁？', 'test content19', '2016-10-24 07:10:31', '2016-10-24 07:10:31', 0, 0, 2, 5, 6);
INSERT INTO `post` VALUES (20, '广西经贸校草评选活动有黑幕吗？', 'test content20', '2016-10-24 07:10:32', '2016-10-24 07:10:32', 0, 0, 3, 2, 6);
INSERT INTO `post` VALUES (21, '南宁师范大学青春争霸赛冠军花落谁家？', '<p><img src=\"http://od6v5lenq.bkt.clouddn.com/22f3b086-01f5-4e3a-8f8b-77cc9d4cfa2d.jpg\" alt=\"a\" style=\"max-width:100%;\"><br></p><p><br></p>', '2016-10-25 10:10:17', '2016-10-25 10:10:17', 0, 0, 3, 1, 6);
INSERT INTO `post` VALUES (22, '', NULL, '1', '1', 0, 0, 2, 66, 77);
INSERT INTO `post` VALUES (23, 'hello', 'word', '1', '1', 0, 0, 2, 66, 77);
INSERT INTO `post` VALUES (25, 'aaa', '<p>aaa</p>', '2021-05-07 16:24:43', '2021-05-07 16:24:43', 0, 0, 2, 1, 0);
INSERT INTO `post` VALUES (26, 'aaaass', '<p>sss</p>', '2021-05-07 17:48:22', '2021-05-07 17:48:22', 0, 0, 2, 1, 1);
INSERT INTO `post` VALUES (27, 'ASDASGFSG', '<p>ASFDSFAS</p>', '2021-05-07 23:22:26', '2021-05-07 23:22:26', 0, 0, 2, 1, 0);
COMMIT;

-- ----------------------------
-- Table structure for reply
-- ----------------------------
DROP TABLE IF EXISTS `reply`;
CREATE TABLE `reply` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `content` text,
  `pid` int(11) NOT NULL,
  `uid` int(11) NOT NULL,
  `reply_time` varchar(30) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of reply
-- ----------------------------
BEGIN;
INSERT INTO `reply` VALUES (1, '666', 1, 2, '1');
INSERT INTO `reply` VALUES (2, '666', 8, 1, '2');
INSERT INTO `reply` VALUES (3, '666', 8, 5, '3');
INSERT INTO `reply` VALUES (8, '666', 8, 8, '1');
INSERT INTO `reply` VALUES (9, '<p>z111</p>', 8, 1, '2021-05-09 16:58:51');
INSERT INTO `reply` VALUES (10, '<p>asdasdd</p>', 1, 1, '2021-05-09 19:17:48');
INSERT INTO `reply` VALUES (11, '<p>asd</p>', 3, 1, '2021-05-09 19:19:19');
INSERT INTO `reply` VALUES (12, '<p>111</p>', 8, 1, '2021-05-09 20:30:56');
COMMIT;

-- ----------------------------
-- Table structure for topic
-- ----------------------------
DROP TABLE IF EXISTS `topic`;
CREATE TABLE `topic` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) NOT NULL,
  `content` varchar(50) DEFAULT '',
  `image` varchar(100) DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of topic
-- ----------------------------
BEGIN;
INSERT INTO `topic` VALUES (1, 'Java', '暂无描述', 'http://www.doublefuck.top/image/b.jpg');
INSERT INTO `topic` VALUES (2, 'Python', '暂无描述', 'http://www.doublefuck.top/image/b.jpg');
INSERT INTO `topic` VALUES (3, '数据结构', '暂无描述', 'http://www.doublefuck.top/image/b.jpg');
INSERT INTO `topic` VALUES (4, '算法', '暂无描述', 'http://www.doublefuck.top/image/b.jpg');
INSERT INTO `topic` VALUES (5, '操作系统', '暂无描述', 'http://www.doublefuck.top/image/b.jpg');
INSERT INTO `topic` VALUES (6, '计算机网络', '暂无描述', 'http://www.doublefuck.top/image/b.jpg');
INSERT INTO `topic` VALUES (7, '数据库', '暂无描述', 'http://www.doublefuck.top/image/b.jpg');
INSERT INTO `topic` VALUES (8, '编译原理', '暂无描述', 'http://www.doublefuck.top/image/b.jpg');
INSERT INTO `topic` VALUES (9, '软件工程', '暂无描述', 'http://www.doublefuck.top/image/b.jpg');
INSERT INTO `topic` VALUES (10, 'JavaWeb', '暂无描述', 'http://www.doublefuck.top/image/b.jpg');
INSERT INTO `topic` VALUES (11, 'C', '暂无描述', 'http://www.doublefuck.top/image/b.jpg');
INSERT INTO `topic` VALUES (12, 'C++', '暂无描述', 'http://www.doublefuck.top/image/b.jpg');
COMMIT;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(30) NOT NULL COMMENT '邮件地址',
  `password` varchar(100) NOT NULL COMMENT '密码',
  `actived` int(11) NOT NULL,
  `activate_code` varchar(60) NOT NULL,
  `join_time` varchar(30) NOT NULL,
  `username` varchar(20) NOT NULL,
  `description` varchar(30) DEFAULT '',
  `head_url` varchar(100) NOT NULL COMMENT '头像地址',
  `position` varchar(20) DEFAULT '',
  `school` varchar(20) DEFAULT '' COMMENT '学校',
  `job` varchar(20) DEFAULT '' COMMENT '工作',
  `like_count` int(11) DEFAULT '0' COMMENT '粉丝数',
  `post_count` int(11) DEFAULT '0' COMMENT '发帖数',
  `scan_count2` int(11) DEFAULT '0' COMMENT '浏览数',
  `follow_count` int(11) DEFAULT '0',
  `follower_count` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES (1, 'q', 'q', 1, '14773075675632ad6199d5f3e4d908299ac20fc05c72c', '2016-10-24 07:10:47', 'DF2034号', '', 'http://static.yidianzixun.com/beauty/imgs/i_000cfwku.jpg', '', '', '', 0, 4, 20, 0, 0);
INSERT INTO `user` VALUES (2, '2@2.com', '000000', 1, '14773075685817d1efc76a9384392997c07fba1081c45', '2016-10-24 07:10:48', 'DF7339号', '', 'http://static.yidianzixun.com/beauty/imgs/i_000cg2t2.jpg', '', '', '', 0, 1, 20, 0, 0);
INSERT INTO `user` VALUES (3, '3@3.com', '000000', 1, '14773075698454b2d54a9d4cc49369350ddb6b4dfdeda', '2016-10-24 07:10:49', 'DF3888号', '', 'http://static.yidianzixun.com/beauty/imgs/i_000cfwku.jpg', '', '', '', 0, 3, 22, 0, 0);
INSERT INTO `user` VALUES (4, '4@4.com', '000000', 1, '1477307570872b3e42b049ca14c928b58b12d9875c21f', '2016-10-24 07:10:50', 'DF4957号', '', 'http://static.yidianzixun.com/beauty/imgs/i_000cg2t2.jpg', '', '', '', 0, 5, 20, 0, 0);
INSERT INTO `user` VALUES (5, '5@5.com', '000000', 1, '1477307571881b64840b082704c349af1d991997e5195', '2016-10-24 07:10:51', 'DF2276号', '', 'http://static.yidianzixun.com/beauty/imgs/i_000cfwku.jpg', '', '', '', 0, 1, 20, 0, 0);
INSERT INTO `user` VALUES (6, '6@6.com', '000000', 1, '147730757289032677af172084dd3ab87899467e2d65b', '2016-10-24 07:10:52', 'DF7566号', '', 'http://static.yidianzixun.com/beauty/imgs/i_000cg2t2.jpg', '', '', '', 0, 0, 20, 0, 0);
INSERT INTO `user` VALUES (7, '7@7.com', '000000', 1, '14773075739073f418583d3784030ad92af942a6e5a9f', '2016-10-24 07:10:53', 'DF7150号', '', 'http://static.yidianzixun.com/beauty/imgs/i_000cfwku.jpg', '', '', '', 0, 1, 20, 0, 0);
INSERT INTO `user` VALUES (8, '8@8.com', '000000', 1, '1477307574999c7b474240b414be2a56409a931ddf83e', '2016-10-24 07:10:55', 'DF8956号', '', 'http://static.yidianzixun.com/beauty/imgs/i_000cg2t2.jpg', '', '', '', 0, 3, 20, 0, 0);
INSERT INTO `user` VALUES (9, '9@9.com', '000000', 1, '147730757601867cab426b96943968352ea1e3ff76317', '2016-10-24 07:10:56', 'DF7084号', '', 'http://static.yidianzixun.com/beauty/imgs/i_000cfwku.jpg', '', '', '', 0, 3, 20, 0, 0);
INSERT INTO `user` VALUES (10, '10@10.com', '000000', 1, '14773075770730fb573de1e4d4538945c7cad9d52300f', '2016-10-24 07:10:57', 'DF3524号', '', 'http://static.yidianzixun.com/beauty/imgs/i_000cg2t2.jpg', '', '', '', 0, 0, 20, 0, 0);
INSERT INTO `user` VALUES (12, '1104641801@qq.com', '111111', 0, '14773610739371293df921d6d46edb4459472a4c851c7', '2016-10-25 10:10:33', 'DF8405号', '', 'http://static.yidianzixun.com/beauty/imgs/i_000cfwku.jpg', '', '', '', 0, 0, 20, 0, 0);
INSERT INTO `user` VALUES (16, '723159401@qq.com', '123', 1, '512576', '2021-05-06 22:18:46', 'JM316 ?', '', 'http://static.yidianzixun.com/beauty/imgs/i_000cfwku.jpg', '', '', '', 0, 1, 20, 0, 0);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
